<script type="text/javascript">
$(function () {
	var url = '${contextPath}script/el/classes.js';
	$.ajax({url:url, dataType:'script', cache:true,
		success: function(){
			var page = sys_fill_parm('aidQueryTopicForm');
			aidqueryTopicClasses_classes(page);
			getEditTopicInfo_classes();
			calcTotalHasTcOrNotTc_classes();
		}
	});
});
</script>

<#import "/freemarker/modeltype.ftl" as mt>
<#import "/freemarker/modeltype_entity.ftl" as mte>
<form id="aidQueryTopicForm">
	<table class="search_term_table"> 
		<tr>
			<input type="hidden" name="cc" value="${cc!''}" id="courseCode"/>
			<input type="hidden" id="points" value="" />
			<input type="hidden" id="tic" />
			<input type="hidden"  value="" id="numTopic"/>
			<input type="hidden"  value="" id="typeTopic"/>
			<th style="width:40px;">题干</th>
			<td style="width:150px;">
				<input class="form-control" type="text" name="content" style="width:130px;" id="topicContent" />
			</td>
			<div style="display: none;">
				<@mte.Problemtype id="topicType" nullstr='请选择' name="type" wid="140px;"/>
			</div>
			<div style="display: none;">
				<@mte.TopicDifficulty id="topicLevel" nullstr='请选择' name="tdc" wid="140px;"/>
			</div>
			<td style="text-align: right;">
				<button class="btn btn-xs btn-info"  onclick="javascript: aidqueryTopicClasses_classes(); return false;"><i class="icon-search"></i> 查  询</button>
				<button class="btn btn-xs btn-primary"  onclick="javascript: confirmTopic_classes(); return false;"><i class="icon-plus-square"></i> 确 定</button>
			</td>
		</tr>
	</table>
</form>
<div style="margin-left: 25px;"><span id="showTopicTotal" style="color:red;"></span></div>
<div id="topicResultList">
<#if list1?? && list1.list??>
	<div class="wrapper-md ng-scope" style="width:45%;float:left;">
		<table class="table m-b-none default footable-loaded footable" data-page-size="5" data-filter="#filter" ui-jq="footable">
			<thead>
				<tr>
					<th>题目类型</th>
					<th>题目难度 </th>
					<th>数量 </th>
					<th>每题分值 </th>
					<th>操作</th>
				</tr>
			</thead>
			<tbody id="aTbody">
				<#list list1.list as ti>
				<tr class="footable-even" style="display: table-row;">
					<td><@mte.Problemtype s=false  nullstr='请选择'  value=((ti.type)!'') classname="form-control" /></td>
					<td><@mte.TopicDifficulty s=false nullstr='请选择' value=((ti.lc)!'')  classname="form-control" /></td>
					<td>${ti.num!''}</td>
					<td>${ti.point!''}</td>
					<td>
						<button class="btn btn-xs btn-success" onclick="javascript:choiseTopicHasCode_classes($(this),'${ti.type}','${ti.lc}','${ti.code}',null,'${ti.point}','${ti.num}'); return false;" title="编辑">
							<i class="icon-check"></i>
						</button>
					</td>
				</tr>
				</#list>
			</tbody>
		</table>
	</div>
	<div id="mubanCodeDiv"></div>
</#if>
</div>

<table id="addTopicTable" style="display: none;">
	<tr>
		<td><input type="hidden" class="tic"/></td>
		<td><input type="hidden" class="cc"/></td>
		<td><input type="hidden" class="tc"/></td>
		<td><input type="hidden" class="points"/></td>
		<td><input type="hidden" /></td>
		<td><input type="hidden" /></td>
		<td><input type="hidden" /></td>
	</tr>
</table>

<table id="topicTable" style="display: none;">
</table>